package com.core {
import com.Factory;
import com.interfaces.IProxy;

import laya.utils.Handler;

public class Proxy implements IProxy {

	public function Proxy() {
	}

	public function regAction(action:String, caller:*, method:Function, group:String=null):void {
		Factory.inst.regAction(action, caller, method, group);
	}

	public function regActionHandler(action:String, handler:Handler, group:String=null):void {
		Factory.inst.regActionHandler(action, handler, group);
	}

	public function removeAllAction(...arge):void {
		Factory.inst.removeAllAction.apply(Factory.inst, arge);
	}

	public function removeGroup(group:String):void {
		Factory.inst.removeGroup(group);
	}

	public function removeGroupActions(group:String, ...arge):void {
		arge.unshift(group);
		Factory.inst.removeGroupActions.apply(Factory.inst, arge);
	}

	public function removeHandler(action:String, method:Function, group:String = null):void {
		Factory.inst.removeHandler(action, method, group);
	}

	public function sendAction(action:String, ...arge):void {
		arge.unshift(action);
		Factory.inst.sendAction.apply(Factory.inst, arge);
	}

	public function sendGroupAction(group:String, action:String, ...arge):void {
		arge.unshift(action);
		arge.unshift(group);
		Factory.inst.sendGroupAction.apply(Factory.inst, arge);
	}

}
}
